package com.linq.cool.beauty.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.linq.cool.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * @Author: yqlin
 * @Date: 2021/2/8 22:19
 * @Description: 购物车表
 * @Version: 1.0.0
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "beauty_cart_item")
public class BeautyCartItem extends BaseEntity {
    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 客户id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "member_id")
    private Long memberId;

    /**
     * 商品id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "product_id")
    private Long productId;

    /**
     * 商品名称
     */
    @TableField(value = "product_name")
    private String productName;

    /**
     * 商品图片
     */
    @TableField(value = "product_pic")
    private String productPic;

    /**
     * 可获得积分
     */
    @TableField(value = "product_point")
    private BigDecimal productPoint;


    /**
     * 价格
     */
    @TableField(value = "product_price")
    private BigDecimal productPrice;

    /**
     * 状态，1有效0无效
     */
    @TableField(value = "`status`")
    private Integer status;

    /**
     * 是否删除(0: 未删除 1:已删除)
     */
    @TableLogic
    @TableField(value = "is_deleted")
    private Integer isDeleted;
}